
package cn.eoeit.alone.phoneImport.db;

import java.util.ArrayList;
import java.util.List;

import cn.eoeit.alone.phoneImport.model.CityBean;
import cn.eoeit.alone.phoneImport.model.PhoneRecord;




/**
 * The database agent operate class
 * 
 */
public interface CacheDbAgent {

	
	public String COLUMN_ID = "cid";
	
    public static interface HistoryTable{
    	static String  TABLE_NAME= "city_bean";
		static String COLUMN_SPELL = "first_spell";
		static String COLUMN_NAME = "name";
		static String COLUMN_PERIODID = "periodId";
		static String COLUMN_PERIODNAME = "period_name";
		static String COLUMN_SHORT_DESC = "short_desc"; 
		static String COLUMN_KEY_WORDS = "keywords";
		 
    	static String[] COLUMNS = {
    		COLUMN_ID,
    		COLUMN_SPELL,
    		COLUMN_NAME,
    		COLUMN_PERIODID,
    		COLUMN_PERIODNAME,
    		COLUMN_SHORT_DESC,
    		COLUMN_KEY_WORDS
    	};
    	
    	static String[] COLUMNS_BAK = {
    		"a."+COLUMN_ID,
    		"a."+COLUMN_SPELL,
    		"a."+COLUMN_NAME,
    		"a."+COLUMN_PERIODID,
    		"a."+COLUMN_PERIODNAME,
    		"a."+COLUMN_SHORT_DESC,
    		"a."+COLUMN_KEY_WORDS
    	};
		

		 	
    }

    
    
    
    /**
     * 娣诲姞
     * @param bean
     * @return
     */
    public int insert(DatabaseBean bean);
    
    /***
     * 鍒犻櫎
     * @param bean
     * @return
     */
    public boolean delete(final DatabaseBean bean);
    
    /***
     * 鏇存柊
     * @param bean
     * @return
     */
    public boolean update(DatabaseBean bean);

	public ArrayList<CityBean> findAllCityBean();

	public List<PhoneRecord> getPhoneRecord();

  
 
}
